package com.example.mq;

//import com.example.mq.mqserver.BrokerServer;
import com.example.mq.mqserver.BrokerServer;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

import java.io.IOException;

@SpringBootApplication
public class MqApplication {
	// Q: ConfigurableApplicationContext 是什么??
	public static ConfigurableApplicationContext context;

	public static void main(String[] args) throws IOException {
		// 返回值类型
		context = SpringApplication.run(MqApplication.class, args);
		// 传递端口,构造中间件
		BrokerServer brokerServer = new BrokerServer(8083);

//		BrokerServer brokerServer2 = new BrokerServer(8085);
		// 中间件启动
		brokerServer.start();
	}

}
